import request from '@/utils/request'

export default {

  addTeacher(teacher) {
    return request({
      url: '/admin/teacher',
      method: 'post',
      data: teacher
    })
  },
  importStudents(file) {
    return request({
      url: '/admin/teacher/import',
      method: 'post',
      data: file
    })
  },
  deleteTeacher(teacherid) {
    return request({
      url: '/admin/teacher/' + teacherid,
      method: 'delete'
    })
  },
  deleteTeachers(allTeacherIds) {
    return request({
      url: '/admin/teacher/list',
      method: 'delete',
      data: allTeacherIds
    })
  },
  updateTeacher(teacher) {
    return request({
      url: '/admin/teacher',
      method: 'put',
      data: teacher
    })
  },
  resetPassword(teacherid) {
    return request({
      url: '/admin/teacher/' + teacherid,
      method: 'put'
    })
  },
  queryTeacher(teacherid) {
    return request({
      url: '/admin/teacher/' + teacherid,
      method: 'get'
    })
  },
  queryTeachers(teacherQuery) {
    return request({
      url: '/admin/teacher/list',
      method: 'post',
      data: teacherQuery
    })
  },
  queryAllTeachers() {
    return request({
      url: '/admin/teacher/all',
      method: 'get'
    })
  }
}
